package com.om.abom.utils;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
public class PageResult<T> implements Serializable
{
    private long total;

    private List<T> records;

    public PageResult(Page<T> pageInfo)
    {
        this.records = pageInfo.getRecords();
        this.total = pageInfo.getTotal();
    }
}
